# coding=utf-8
# -*- coding: UTF-8 -*-
#
# This file is part of the kernelstudio package.
#
# (c) 2014-2025 zlin <admin@kernelstudio.com>
#
# For the full copyright and license information, please view the LICENSE file
# that was distributed with this source code.

from pydantic import Field
from pydantic_settings import BaseSettings


class OcrExecutorConfig(BaseSettings):

    OCR_CACHEABLE: bool = Field(
        default=True,
        envvar='OCR_CACHEABLE'
    )

    OCR_USE_ANGLE_CLS: bool = Field(
        default=True,
        envvar='OCR_USE_ANGLE_CLS'
    )

    OCR_USE_GPU: bool = Field(
        default=True,
        envvar='OCR_USE_GPU'
    )

    OCR_LANG: str = Field(
        default="ch",
        envvar='OCR_LANG'
    )


ocr_executor_config = OcrExecutorConfig()
